package com.fyh.feign.fallback;

import com.fyh.constant.MessageConstant;
import com.fyh.entity.common.Result;
import com.fyh.entity.community.PostVO;
import com.fyh.entity.community.ReplyVO;
import com.fyh.feign.CommunityUserFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CommunityUserFeignClientFallback implements CommunityUserFeignClient {
    @Override
    public Result<List<PostVO>> selectNicknameAndAvaterPathForPost(List<PostVO> postVOList) {
        System.out.println(MessageConstant.GET_SELECT_NICKNAME_AND_AVATER_PATH_FAILED);
        throw new RuntimeException(MessageConstant.GET_SELECT_NICKNAME_AND_AVATER_PATH_FAILED);
    }

    @Override
    public Result<List<ReplyVO>> selectNicknameAndAvaterPathForReply(List<ReplyVO> ReplyVOList) {
        System.out.println(MessageConstant.GET_SELECT_NICKNAME_AND_AVATER_PATH_FAILED);
        throw new RuntimeException(MessageConstant.GET_SELECT_NICKNAME_AND_AVATER_PATH_FAILED);
    }
}
